#include "Scene.h"
#include "Camera.h"
#include "SceneManager.h"

void SceneManager::set_current_scene(Scene* scene)
{
	Current_Scene = scene;
	Current_Scene->on_enter();
}

void SceneManager::switch_to(SceneType type)
{
	Current_Scene->on_exit();
	switch (type)
	{
	case SceneType::Menu:
		Current_Scene = Menu_Scene;
		break;
	case SceneType::Game:
		Current_Scene = Game_Scene;
		break;
	case SceneType::Selector:
		Current_Scene = Selector_Scene;
		break;
	}
	Current_Scene->on_enter();
}

void SceneManager::on_update(int delta)
{
	Current_Scene->on_update(delta);
}

void SceneManager::on_draw(const Camera& camera)
{
	Current_Scene->on_draw(camera);
}

void SceneManager::on_input(const ExMessage& meg)
{
	Current_Scene->on_input(meg);
}
